<template>
  <div class="View">
    <!-- tab切换菜单 -->
    <el-tabs v-model="activeName" @tab-click="handleClick" class="bh-tab">
      <el-tab-pane :label="$t('message.excelTabs.title_1')" name="first"></el-tab-pane>
    </el-tabs>

    <!-- 内容区域 -->
    <div class="container">
      <!-- 头部 -->
      <div class="title-view">
        <div class="top-btn-view">
          <div class="bottom">
            <div class="bottom-left-view">
              <div class="b-input">
                <div class="b-input-label">
                  {{ $t("message.bhView.label.Plant") }}
                </div>
                <!-- 装置名称 -->
                <el-input
                  v-model="$store.state.excelPlantName"
                  class="selectInput"
                  readonly
                ></el-input>
              </div>
              <div class="b-input">
                <div class="b-input-label">
                  {{ $t("message.bhView.label.jqName") }}
                </div>
                <!-- macName -->
                <el-input
                  v-model="$store.state.excelMacName"
                  clearable
                  :placeholder="$t('message.bhView.label.placeholder')"
                  class="selectInput"
                  readonly
                ></el-input>
                <!-- 机器名称长name -->
                <el-input
                  v-model="$store.state.excelMacNameb"
                  clearable
                  :placeholder="$t('message.bhView.label.placeholder')"
                  class="selectInput selectInputlong"
                  readonly
                ></el-input>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- 主体内容区 -->
      <div class="leftTabel-rightTabel-lineContent">
        <div class="left">
          <left-content></left-content>
        </div>
        <div class="right">
          <router-view></router-view>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import LeftContent from "../Excel/LeftContent/index";
import $ from "jquery";
export default {
  name: "ExcelContent",
  data() {
    return {
      activeName: "first",
    };
  },
  components: {
    "left-content": LeftContent,
  },
  watch: {},
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
  created() {},
  mounted() {
    this.$nextTick(function () {
      if ($(".LeftMenu").width() == 64) {
        $(".View").width($(".Content").width() - 64);
      } else if ($(".LeftMenu").width() == 192) {
        $(".View").width($(".Content").width() - 192);
      }
    });
  },
  beforeDestroy() {},
  destroyed() {},
};
</script>
<style  lang="scss" scoped>
.View {
  width: calc(100% - 192px);
  height: 100%;
  .container {
    width: 100%;
    height: calc(100% - 55px);
    .title-view {
      width: calc(100% - 48px);
      background: #f8f8f8;
      border-bottom: 1px solid #e1e1e1;
      margin-left: 24px;
      .top-tab {
        display: flex;
        width: 100%;
        height: 55px;
      }
      .btn-box {
        display: flex;
        align-items: center;
        justify-content: flex-start;
      }
      .top-btn-view {
        height: 48px;
        display: flex;
        align-content: center;
        justify-content: space-between;
        .tab-btn {
          min-width: 60px;
          height: 32px;
          text-align: center;
          line-height: 32px;
          color: rgba(0, 0, 0, 0.65);
          margin-right: 2px;
          border-radius: 2px;
          transition: 0.5s;
        }
        .tab-btn:hover {
          background: rgba(33, 61, 73, 0.05);
        }
        .downBtnActive {
          background: rgba(33, 61, 73, 0.05);
        }
      }
      .bottom {
        width: calc(100% - 256px);
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        // margin-left: 120px;
        .bottom-left-view {
          display: flex;
          align-items: center;
          justify-content: flex-start;
          height: 48px;
        }
        .bottom-right-view {
          display: flex;
          align-items: center;
          justify-content: flex-start;
          height: 48px;
          button {
            min-width: 52px;
            height: 24px;
            border-radius: 4px;
            border: 1px solid #d3d3d3;
            margin-left: 16px;
          }
          .bg-bottom-btn {
            background: #106ebe;
            color: #ffffff;
          }
        }
        .b-input {
          display: flex;
          align-items: center;
          height: 100%;
          margin-right: 24px;
          .b-input-label {
            font-size: 14px;
            color: rgba(0, 0, 0, 0.85);
            height: 24px;
            line-height: 24px;
          }
          .selectInput {
            width: 224px;
            height: 24px;
          }
          .selectInputlong {
            width: 384px;
            margin-left: 8px;
            ::v-deep .el-input__inner {
              width: 384px;
            }
          }
          ::v-deep .el-input__inner {
            width: 224px;
            height: 24px;
            color: rgba(0, 0, 0, 0.65);
            background: #f8f8f8;
          }
          ::v-deep .el-input__icon {
            line-height: 24px;
          }
        }
      }
    }

    .leftTabel-rightTabel-lineContent {
      width: 100%;
      height: calc(100% - 52px);
      display: flex;
      justify-content: flex-start;
      .left {
        height: 100%;
        height: 100%;
      }
      .right {
        width: calc(100% - 264px);
        padding: 0 16px;
        height: 100%;
        display: flex;
        flex-direction: column;
      }
      .wide-right {
        width: 100%;
        padding: 0 16px 0 24px;
      }
    }
  }
}
.bh-tab {
  width: 100%;
  // height: 100%;
  ::v-deep .el-tabs__header {
    margin: 14px 24px 0 24px;
    width: calc(100% -48px);
  }
  ::v-deep .el-tabs__content {
    height: calc(100% - 55px);
  }
  ::v-deep #pane-first {
    height: 100%;
  }
  ::v-deep #pane-second {
    height: 100%;
  }
  ::v-deep #pane-third {
    height: 100%;
  }
}
</style>
